package com.zmh.wuye.controller;

import com.zmh.wuye.dao.DatabaseMapper;
import com.zmh.wuye.entity.Database1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@CrossOrigin
@RestController
public class DatabaseController {
    @Autowired
    private DatabaseMapper databaseMapper;
    @RequestMapping("/selectDatabaseList")
    public List<Database1> selectDatabaseList(Database1 database1){
        return databaseMapper.selectDatabase(database1);
    }
    @RequestMapping("/getDatabase1Count")
    public int getCostCount(Database1 database1){
        return databaseMapper.getCount(database1);

    }
}
